﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using VioletDevelopmentLaboratory.Net.Web;

public partial class vboard_membership_login : VioletDevelopmentLaboratory.Net.Web.PageBase
{
	protected void Page_Init(object sender, EventArgs e)
	{
		Page.Header.Title = GetLocalResourceObject("Title").ToString();
	}
	protected void LoginButton_Click(object sender, EventArgs e)
	{
		if (Page.IsValid)
		{
			if (Membership.ValidateUser(UserNameTextBox.Text, PasswordTextBox.Text))
			{
				FormsAuthentication.RedirectFromLoginPage(UserNameTextBox.Text, RememberMeCheckBox.Checked);
			}
			else
			{
				VUtility.ShowMessagePanel(Page, VUtility.GetVWebGlobalResource("Membership_Do_Login_Failure"), true);
			}
		}
	}
}
